<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
</head>
<body>
<h1>1111111111111</h1>
<table width="200" border="1">
    <tr>
        <th scope="col">ID</th>
        <th scope="col">姓名</th>
        <th scope="col">数量</th>
        <th scope="col">细节</th>
    </tr>
    <c:forEach items="${pageInfo.list}" var="book">
        <tr>
            <td>${book.getBookID()}</td>
            <td>${book.getBookName()}</td>
            <td>${book.getBookCounts()}</td>
            <td>${book.getDetail()}</td>
        </tr>
    </c:forEach>
</table>
<p>当前 ${pageInfo.pageNum }页,总${pageInfo.pages }
    页,总 ${pageInfo.total } 条记录</div></p>
<a href="list?pageNo=${pageInfo.firstPage}">第一页</a>
<c:if test="${pageInfo.hasPreviousPage }">
    <a href="list?pageNo=${pageInfo.pageNum-1}">上一页</a>
</c:if>
<c:forEach begin="1" end="${pageInfo.pages}" var="pageNumber">
    <li><a href="list?pageNo=${pageNumber}&size=5">${pageNumber}</a>
    </li>
</c:forEach>
<c:if test="${pageInfo.hasNextPage }">
    <a href="list?pageNo=${pageInfo.pageNum+1}">下一页</a>
</c:if>

<a href="list?pageNo=${pageInfo.lastPage}">最后页</a>
</body>
</html>
